{layout name="layout" /}
<style>
    .content{
        padding: 5px 10px;
        background: #eeeeee;
        margin:5px 0px;
    }
</style>
<div class="col-md-12">
    <div class="card">
        <div class="card-body">

            <ul id="myTabs" class="nav nav-tabs" role="tablist">
                <li class="active"><a href="#access-token" id="access-token-tab" role="tab" data-toggle="tab">获取access_token</a>
                </li>
                <li><a href="#refresh-token" role="tab" id="refresh-token-tab" data-toggle="tab">刷新access_token</a></li>
                <li><a href="#single" role="tab" id="single-tab" data-toggle="tab">单条生成</a></li>
                <li><a href="#batch" role="tab" id="batch-tab" data-toggle="tab">批量生成</a></li>
                <li><a href="#code" role="tab" id="code-tab" data-toggle="tab">错误码</a></li>
            </ul>
            <div id="myTabContent" class="tab-content">
                <div class="tab-pane fade active in" id="access-token">
                    <h3>地址</h3>
                    <p class="content"><strong>{$Request.domain}/v1/token</strong></p>
                    <h3>请求方式：</h3>
                    <p class="content"><strong>GET</strong></p>
                    <h3>HTTP 头信息:</h3>
                    <p class="content">
                        Accept:application/json;charset=utf-8;
                    </p>
                    <h3>请求参数:</h3>
                    <table class="table">
                        <thead>
                        <tr>
                            <td>字段</td>
                            <td>参数类型</td>
                            <td>是否必传</td>
                            <td>描述</td>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>appid</td>
                            <td>string</td>
                            <td>是</td>
                            <td>注册时系统生成的用户唯一码</td>
                        </tr>
                        <tr>
                            <td>secret</td>
                            <td>string</td>
                            <td>是</td>
                            <td>注册时系统生成的用户密钥（可重置）</td>
                        </tr>
                        </tbody>
                    </table>

                    <h3>返回示例：</h3>
                    <code>
                        {
                        "code": 200,
                        "message": "",
                        "data": {
                        "access_token": "*************************************************",
                        "expire_in": 7200
                        },
                        "wait": 3,
                        "url": ""
                        }
                    </code>
                </div>
                <div class="tab-pane fade" id="refresh-token">
                    <h3>地址</h3>
                    <p class="content"><strong>{$Request.domain}/v1/refresh</strong></p>
                    <h3>请求方式：</h3>
                    <p class="content"><strong>GET</strong></p>
                    <h3>HTTP 头信息:</h3>
                    <p class="content">
                        Accept:application/json;charset=utf-8;
                    </p>
                    <h3>请求参数:</h3>
                    <table class="table">
                        <thead>
                        <tr>
                            <td>字段</td>
                            <td>参数类型</td>
                            <td>是否必传</td>
                            <td>描述</td>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>appid</td>
                            <td>string</td>
                            <td>是</td>
                            <td>注册时系统生成的用户唯一码</td>
                        </tr>
                        <tr>
                            <td>secret</td>
                            <td>string</td>
                            <td>是</td>
                            <td>注册时系统生成的用户密钥（可重置）</td>
                        </tr>
                        <tr>
                            <td>access_token</td>
                            <td>string</td>
                            <td>是</td>
                            <td>之前调取生成token接口返回的数据</td>
                        </tr>
                        </tbody>
                    </table>

                    <h3>返回示例：</h3>
                    <code>
                        {
                        "code": 200,
                        "message": "",
                        "data": {
                        "access_token": "**********************************",
                        "refresh_token": "****************************************",
                        "expire_in": 7200
                        },
                        "wait": 3,
                        "url": ""
                        }
                    </code>
                    <p class="content">原access_token将会在5分钟后过期</p>
                </div>
                <div class="tab-pane fade" id="single">
                    <h3>地址</h3>
                    <p class="content"><strong>{$Request.domain}/v1/single</strong></p>
                    <h3>请求方式：</h3>
                    <p class="content"><strong>POST</strong></p>
                    <h3>HTTP 头信息:</h3>
                    <p class="content">
                        Accept:application/json;charset=utf-8;access_token:**********************************************;
                    </p>
                    <h3>请求参数:</h3>
                    <table class="table">
                        <thead>
                        <tr>
                            <td>字段</td>
                            <td>参数类型</td>
                            <td>是否必传</td>
                            <td>描述</td>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>appid</td>
                            <td>string</td>
                            <td>是</td>
                            <td>注册时系统生成的用户唯一码</td>
                        </tr>
                        <tr>
                            <td>url</td>
                            <td>string</td>
                            <td>是</td>
                            <td>要转换的地址</td>
                        </tr>
                        <tr>
                            <td>scene</td>
                            <td>string</td>
                            <td>是</td>
                            <td>链接类型 normal普通链接 permanent永久链接 temporary临时链接 暂时没有区别后续会三者的生存时间会不同</td>
                        </tr>
                        </tbody>
                    </table>

                    <h3>返回示例：</h3>
                    <code>
                        {
                        "code": 200,
                        "message": "",
                        "data": {
                        "access_token": "**********************************",
                        "refresh_token": "****************************************",
                        "expire_in": 7200
                        },
                        "wait": 3,
                        "url": ""
                        }
                    </code>

                </div>
                <div class="tab-pane fade" id="batch">
                    <p class="content">                   暂未整理
                    </p>
                </div>
                <div class="tab-pane fade" id="code">
                    <p class="content">除200外皆为不成功 详细请见返回的message字段</p>
                </div>
            </div>

        </div>
    </div>
</div>